package com.zhongyw.mvt.gis.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.opengis.geometry.Geometry;

/**
 * @author zhong
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@ApiModel(description = "postGIS接口支持参数")
public class VectorTile {

    private String geom;
    private String geoJson;
    private double distance; // 新增字段用于保存距离

    // Getter / Setter
    public static VectorTile fromGeoJson(String geoJson) {
        VectorTile tile = new VectorTile();
        tile.setGeoJson(geoJson);
        return tile;
    }
    // 私有构造方法
    public VectorTile(String geom) {
        this.geom = geom;
    }


}